const user = {
  namespaced: true,
  state: {
    username: "",
    password: ""
  },

  mutations: {
    SET_USERINFO: (state, userInfo) => {
      state.username = userInfo.username ? userInfo.username : "";
      state.password = userInfo.password ? userInfo.password : "";
    }
  },

  actions: {
    // 登录
    Login({ commit }, userInfo) {
      commit("SET_USERINFO", userInfo)
    }
  }
};
export default user;
